Skip to content

Make target pointer width in target json an integer #144443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

WaffleLapkin
Copy link
Member

@WaffleLapkin WaffleLapkin commented Jul 25, 2025

r? Noratrieb
cc @RalfJung (https://github.com/rust-lang/rust/pull/142352/files#r2230380120)

try-job: x86_64-rust-for-linux

@rustbot
Copy link
Collaborator

rustbot commented Jul 25, 2025

Noratrieb is not on the review rotation at the moment.
They may take a while to respond.

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 25, 2025

This PR modifies run-make tests.

cc @jieyouxu

These commits modify compiler targets.
(See the Target Tier Policy.)

Some changes occurred in src/tools/compiletest

cc @jieyouxu

Copy link
Member

@Noratrieb Noratrieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure if it's worth breaking everyone over such a minor improvement.. maybe? maybe not?

@rust-log-analyzer

This comment has been minimized.

@Noratrieb
Copy link
Member

Noratrieb commented Jul 25, 2025

I'm inclined to say yes, but it would probably be good to get this merged today so it can be in the same nightly as the other breaking change instead of two consecutive nightlies (it would also be fine to do that, but less cool)

@RalfJung
Copy link
Member

I'm unsure if it's worth breaking everyone over such a minor improvement.. maybe? maybe not?

We already did that with #144443... the current state is just inconsistent.

But, no strong opinion.

@WaffleLapkin WaffleLapkin force-pushed the integer-target-pointer-width branch from bb5b5c5 to 283f21b Compare July 25, 2025 11:55
@WaffleLapkin
Copy link
Member Author

@Noratrieb what's the other breaking change? #142352 has been merged for over a month..

@rust-log-analyzer

This comment has been minimized.

@WaffleLapkin WaffleLapkin force-pushed the integer-target-pointer-width branch from 283f21b to 267f0bd Compare July 25, 2025 12:35
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member

RalfJung commented Jul 25, 2025

@Noratrieb what's the other breaking change? #142352 has been merged for over a month..

Uh, but then why did Miri CI only start failing today?

Something changed in 9748d87...b56aaec.

@WaffleLapkin WaffleLapkin force-pushed the integer-target-pointer-width branch from b64ab4a to b2871e5 Compare July 25, 2025 13:33
@RalfJung
Copy link
Member

RalfJung commented Jul 25, 2025

The breaking change was probably #144218.

@WaffleLapkin
Copy link
Member Author

The only relevant change I see is #144218, but that doesn't explain anything, it should have been failing with #142352, I don't see how it could have accepted c-int-width being a string...

@RalfJung
Copy link
Member

It might be that the field of wrong type just got ignored, which is exactly why Nora ported this to serde.

@WaffleLapkin
Copy link
Member Author

You are right indeed. The code in #142352:

                if let Some(s) = obj.remove(name).and_then(|b| b.as_u64()) {
                    base.$key_name = s as $int_ty;
                }

and_then(|b| b.as_u64()) makes it so non-integers are ignored.

@rust-log-analyzer

This comment has been minimized.

ojeda added a commit to Rust-for-Linux/linux that referenced this pull request Aug 21, 2025
Starting with Rust 1.91.0 (expected 2025-10-30), the target spec format
has changed the type of the `target-pointer-width` key from string
to integer.

Thus conditionally use one or the other depending on the version.

Link: rust-lang/rust#144443 [1]
Signed-off-by: Miguel Ojeda <[email protected]>
ojeda added a commit to ojeda/rust that referenced this pull request Aug 21, 2025
To unblock the Rust CI in PR [1], use a temporary commit from Rust for
Linux that supports the future target spec format.

Link: rust-lang#144443 [1]
Signed-off-by: Miguel Ojeda <[email protected]>
@ojeda
Copy link
Contributor

ojeda commented Aug 21, 2025

Please retry with a commit like ojeda@2a25b51 on top of this branch.

WaffleLapkin pushed a commit to WaffleLapkin/rust that referenced this pull request Aug 22, 2025
To unblock the Rust CI in PR [1], use a temporary commit from Rust for
Linux that supports the future target spec format.

Link: rust-lang#144443 [1]
Signed-off-by: Miguel Ojeda <[email protected]>
@rustbot rustbot added A-CI Area: Our Github Actions CI T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Aug 22, 2025
@WaffleLapkin
Copy link
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Aug 22, 2025
…<try>

Make target pointer width in target json an integer

try-job: x86_64-rust-for-linux
@rust-bors
Copy link

rust-bors bot commented Aug 22, 2025

☀️ Try build successful (CI)
Build commit: 63ee544 (63ee54494d7bc18f7a01b015ac4376c080101955, parent: f5703d5dd3eec176f86a6e9bf7e668b48b84eabb)

@Noratrieb
Copy link
Member

(btw you can pass try-jobs to bors try directly now :3)
@bors r+

@bors
Copy link
Collaborator

bors commented Aug 22, 2025

📌 Commit f0e9fd6 has been approved by Noratrieb

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Aug 22, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 22, 2025
…r-width, r=Noratrieb

Make target pointer width in target json an integer

r? Noratrieb
cc `@RalfJung` (https://github.com/rust-lang/rust/pull/142352/files#r2230380120)

try-job: x86_64-rust-for-linux
@WaffleLapkin
Copy link
Member Author

@ojeda thanks for a timely fix!

bors added a commit that referenced this pull request Aug 23, 2025
Rollup of 20 pull requests

Successful merges:

 - #132087 (Fix overly restrictive lifetime in `core::panic::Location::file` return type)
 - #137396 (Recover `param: Ty = EXPR`)
 - #142185 (Convert moves of references to copies in ReferencePropagation)
 - #144443 (Make target pointer width in target json an integer)
 - #144648 (Implementation: `#[feature(nonpoison_rwlock)]`)
 - #144897 (print raw lifetime idents with r#)
 - #145218 ([Debuginfo] improve enum value formatting in LLDB for better readability)
 - #145380 (Add codegen-llvm regression tests)
 - #145573 (Add an experimental unsafe(force_target_feature) attribute.)
 - #145597 (resolve: Remove `ScopeSet::Late`)
 - #145641 (On E0277, point at type that doesn't implement bound)
 - #145669 (rustdoc-search: GUI tests check for `//` in URL)
 - #145695 (Introduce ProjectionElem::try_map.)
 - #145710 (Fix the ABI parameter inconsistency issue in debug.rs for LoongArch64)
 - #145726 (Experiment: Reborrow trait)
 - #145731 (Make raw pointers work in type-based search)
 - #145736 (triagebot: Update style team reviewers)
 - #145738 (Uplift rustc_mir_transform::coverage::counters::union_find to rustc_data_structures.)
 - #145743 (doc: fix some typos in comment)
 - #145745 (tests: Ignore basic-stepping.rs on LoongArch)

Failed merges:

 - #145670 (port `sanitize` attribute to the new parsing infrastructure)

r? `@ghost`
`@rustbot` modify labels: rollup
@jhpratt
Copy link
Member

jhpratt commented Aug 23, 2025

@bors r-

#145764 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 23, 2025
@WaffleLapkin WaffleLapkin force-pushed the integer-target-pointer-width branch from f0e9fd6 to fe01e35 Compare August 23, 2025 14:09
@rustbot
Copy link
Collaborator

rustbot commented Aug 23, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@ojeda
Copy link
Contributor

ojeda commented Aug 23, 2025

@ojeda thanks for a timely fix!

You're welcome! I will get the ball rolling on the kernel side then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Our Github Actions CI A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-rust-for-linux Relevant for the Rust-for-Linux project A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.